package com.liu.qqRobot.poke.job;

import com.liu.mybatisPlus.poke.service.SyncPokeService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SyncPokeJob {

    @Resource
    private SyncPokeService syncPokeService;

//    @Scheduled(cron = "59 59 23 * * ?")
    public void syncPoke() {
        log.info("开始同步wiki.52poke.com中的Poke");
        try {
            syncPokeService.syncPoke();
        } catch (Exception e) {
            log.error("同步wiki.52poke.com中的Poke异常，异常原因：{}", e.getMessage(), e);
        }
        log.info("结束同步wiki.52poke.com中的Poke");
    }

}
